package com.minelx.sqlstructures.core;

import java.sql.ResultSet;

public class Column {

	private final ColumnType type;

	private final int cellAt;

	private final String label;

	public Column(int columnAt, ColumnType type, String label) {
		this.type = type;
		this.label = label;
		cellAt = columnAt + 1;
	}

	String asText(ResultSet resultSet) {
		return type.cellAsText(resultSet, cellAt);
	}

	public String label() {
		return label;
	}
}
